<template>
<div>
  <el-table
      :data="scores"
      border
      style="width: 100%">
    <el-table-column
        prop="courseName"
        label="课程"
        width="180">
    </el-table-column>
    <el-table-column
        prop="num"
        label="分数"
        width="180">
    </el-table-column>
  </el-table>
</div>
</template>

<script>
export default {
  name: "ScoreInfo",
  data(){
    return{
      scores:[]
    }
  },
  created() {
    let user = JSON.parse(sessionStorage.getItem("user"))
    console.log(user)
    this.getRequest('getScores?userId='+user.id).then(resp=>{
      this.scores = resp.data
    })
  }
}
</script>

<style scoped>
ul{
  display: inline-block;
}
li{
  display: block;
  width: 200px;
  margin-top: 20px;
  border-bottom: 1px solid #000;
}
</style>